import {
  Http
} from '../../http-d.js'
var http = new Http();
class GoodsModels
{
  /**
   * 获取商品分类
   */
  getIndex(success){
    var url = '/index/index/getIndex';
    http.asynRequest(url, { }, function (res) {
      success(res);
    })
  }

  /**
   * 首页专区列表
   */
  getPrefecture(page,success){
    var url = '/index/goods/getPrefecture';
    http.asynRequest(url, { 'page': page }, function (res) {
      success(res);
    })
  }

  /**
   * 获取分类商品
   */
  getGoodsList(param,success){
    var url = '/index/goods/getGoodsList';
    http.request(url, param, function (res) {
      success(res);
    })
  }
  getGoodsDetail(param,success){
    var url = '/index/goods/getGoodDetail';
    http.request(url, param, function (res) {
      success(res);
    })
  }
}
export {
  GoodsModels
}